package routers

import (
	"github.com/gin-gonic/gin"
	"todo-demo/services"
)

func TodoRouterInit(r *gin.Engine) {
	todoRouters := r.Group("/todo")
	{
		todoRouters.GET("/", services.TodoService{}.Index)
		todoRouters.GET("/migrate", services.TodoService{}.AutoMigrate)
		todoRouters.POST("/add", services.TodoService{}.Add)
		todoRouters.GET("/finish", services.TodoService{}.Finish)
	}
}
